define(['app'],function(app){return {module: function($scope, $http, eventBusService, httpService, params) {
	$scope.form.father_id=params.father_id;

	httpService.postpage(app.urls.port_select,{"port_pk":params.id},function(data){
		if("0000" === data.code){
			$scope.port = data.data[0];
		}else{
			alert(data.msg);
		}
	});
	$scope.saveForm = function(){
		if($scope.formCheck()) {
			httpService.post(app.urls.port_update,$scope.port,function(data){
				if("0000" === data.code){
					eventBusService.publish("content.page.reload", data);
					eventBusService.publish("modal.page.close", {});
				}else{
					alert(data.msg);
				}
			});
		}
	}
}}});